<?php

class User_Form_Login extends Engine_Form {
	
	public function __construct($options = null) {
		parent::__construct($options);
		
		$this->setAction('/user/login')
			 ->setMethod('post');
		
		$username = $this->createElement('text', 'useremail');
		$username->addValidator('emailAddress')
				 ->addValidator('stringLength', false, array(6, 150))
				 ->setRequired(true)
				 ->addFilter('StringToLower')
				 ->setLabel($this->translate->_('ENGINE_LOGIN_FORM_EMAIL_LABEL'));
	
		$password = $this->createElement('password', 'password');
		$password->addValidator('stringLength', false, array(6, 20))
				 ->setRequired(true)
				 ->setLabel($this->translate->_('ENGINE_LOGIN_FORM_PASSWORD_LABEL'));
				 
		$this->addElement($username)
			 ->addElement($password)
			 ->addElement('submit', 'login', array('label' => $this->translate->_('ENGINE_WORD_LOGIN')));
		
	}
	
}

?>